package com.design;

import com.design.adapter.JsonDataAdapter;
import com.design.adapter.XMLDataAdapter;
import com.design.data.JsonData;
import com.design.data.XMLData;

/**
 * 客户端测试
 */
public class MainTest {
    public static void main(String[] args) {
        // 测试JSON数据适配器
        JsonData jsonData = new JsonData();
        IDataProcess jsonDataAdapter = new JsonDataAdapter(jsonData);
        System.out.println(jsonDataAdapter.processData());
        System.out.println("----------------------------------");
        // 测试XML数据适配器
        XMLData xmlData = new XMLData();
        IDataProcess xmlDataAdapter = new XMLDataAdapter(xmlData);
        System.out.println(xmlDataAdapter.processData());
    }
}
